package com.wsw.ssh.system.model;

// default package

import javax.persistence.Column;
import javax.persistence.Embeddable;

/**
 * roleMenuId entity. @author MyEclipse Persistence Tools
 */
@Embeddable
public class RoleMenuId implements java.io.Serializable {

	// Fields

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	private String menuId;
	private String roleId;

	// Constructors

	/** default constructor */
	public RoleMenuId() {
	}

	/** full constructor */
	public RoleMenuId(String menuId, String roleId) {
		this.menuId = menuId;
		this.roleId = roleId;
	}

	// Property accessors

	@Column(name = "t_menu_id", nullable = false, length = 32)
	public String getMenuId() {
		return this.menuId;
	}

	public void setMenuId(String menuId) {
		this.menuId = menuId;
	}

	@Column(name = "t_role_id", nullable = false, length = 32)
	public String getRoleId() {
		return this.roleId;
	}

	public void setRoleId(String roleId) {
		this.roleId = roleId;
	}

	public boolean equals(Object other) {
		if ((this == other))
			return true;
		if ((other == null))
			return false;
		if (!(other instanceof RoleMenuId))
			return false;
		RoleMenuId castOther = (RoleMenuId) other;

		return ((this.getMenuId() == castOther.getMenuId()) || (this
				.getMenuId() != null && castOther.getMenuId() != null && this
				.getMenuId().equals(castOther.getMenuId())))
				&& ((this.getRoleId() == castOther.getRoleId()) || (this
						.getRoleId() != null && castOther.getRoleId() != null && this
						.getRoleId().equals(castOther.getRoleId())));
	}

	public int hashCode() {
		int result = 17;

		result = 37 * result
				+ (getMenuId() == null ? 0 : this.getMenuId().hashCode());
		result = 37 * result
				+ (getRoleId() == null ? 0 : this.getRoleId().hashCode());
		return result;
	}

}